package com.redis;

import com.alibaba.fastjson.TypeReference;

public interface Cache {

    <T> void set(String key, T object);

    <T> void set(String key, T object, int expireSecond);

    String getString(String key);

    <T> T get(String key, Class<T> t);

    <T> T get(String key, TypeReference<T> typeReference);

    boolean exists(String key);

    long exists(String... keys);

    long delete(String key);

    long delete(String... keys);

    long expire(String key, int seconds);

    long setnx(String key, String value);
}
